﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TenpointSystem.Common.Db;
using TenpointSystem.Domian;

namespace TenpointSystem.Dal.UserTableMapper
{
    class SearchUserVaildMapper : RowMapper<User>
    {
        public override User extractData(System.Data.DataTable dt, int row)
        {
            User u = new User();
            u.Id = dt.Rows[row]["id"].ToString();
            u.LoginName = dt.Rows[row]["login_name"].ToString();
            u.NickName = dt.Rows[row]["nick_name"].ToString();
            u.TrueName = dt.Rows[row]["true_name"].ToString();
            u.IdNo = dt.Rows[row]["id_no"].ToString();
            u.QqNo = dt.Rows[row]["qq_no"].ToString();
            u.MobileNo = dt.Rows[row]["mobile_no"].ToString();
            u.Address = dt.Rows[row]["address"].ToString();
            u.Zipcode = dt.Rows[row]["zip_code"].ToString();
            u.RoleId = dt.Rows[row]["role_id"].ToString();
            return u;
        }
    }
}
